<?php

function start_print_slide() {
    echo '
<div id="slideshow">
  <div id="slidesContainer">
    
 ';
}

function end_print_slide() {
    echo ' </div>
</div>';
}

function content_slide($id, $type_slide, $type_img) {
    echo '
    <div class="slide">
  ';
    if ($type_slide == 'works') {
        switch ($type_img) {
            case 0 :
                $ext = 'png';
                break;
            case 1 :
                $ext = 'jpg';
                break;
            case 2 :
                $ext = 'jpeg';
                break;
            default :
                $ext = '';
                break;
        }


        echo ' <a class="lien_event" href="' . URL_ROOT . 'oeuvres/details-' . $id . '">
            <img class="img_work" class="template_img_slide" src="' . URL_IMG . 'works/' . $id . '.' . $ext . '" alt="" />
                </a>

    </div>';
    }
    if ($type_slide == 'news') {
        switch ($type_img) {
            case 0 :
                $ext = 'png';
                break;
            case 1 :
                $ext = 'jpg';
                break;
            case 2 :
                $ext = 'jpeg';
                break;
            default :
                $ext = '';
                break;
        }

        echo ' <a class="lien_event" href="' . URL_ROOT . 'actualites">
            <img class="img_work" class="template_img_slide" src="' . URL_IMG . 'news/' . $id . '.' . $ext . '" alt="" />
                </a>

    </div>';
    }
}

?>